package com.changcheng.service;

import com.changcheng.pojo.Do.PageInfo;
import com.changcheng.pojo.Product;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

public interface ProductService {
    List<Product> select(PageInfo pageInfo);
    int selectItemsNumber();
    boolean delete(Integer id);
    //用户上传图片，并将图片的url存在session中,若成功则返回url，否则返回null
    String upload(HttpServletRequest request);
    boolean update(Product product,HttpServletRequest request);
    boolean updateStateUsingById(Integer id,Integer state);
    //添加产品
    boolean add(Product product,HttpServletRequest request);
    List<Product> customer_search();
}
